﻿using FluentValidation;
using Mes.Application.DTO.Inputs.Operations;

namespace Mes.Application.Web.Validators.Operations.StdOper
{
    public class StdOperUpdateInputValidator : AbstractValidator<StdOperUpdateInput>
    {
        public StdOperUpdateInputValidator()
        {
            RuleFor(x => x.Oper_Id)
                .NotEmpty().WithMessage("Oper_Id不能为空")
                .MinimumLength(1).WithMessage("Oper_Id长度不能小于1")
                .MaximumLength(64).WithMessage("Oper_Id长度不能大于64")
                .Length(1, 64);
        }
    }
}
